package com.cbs.bluetooth.device.qunsuo;

/**
 * Created by broche on 10/9/15.
 */
public enum PrintFailureState {
    PrinterNotFound(0),
    BluetoothNotAvailable(1),
    PrinterIsConnecting(2),
    BluetoothNotEnabled(3),
    UserCanceled(4),
    NoContent(5);

    private int value = 0;

    PrintFailureState(int value) {
        this.value = value;
    }

    public int value() {
        return this.value;
    }

    public static PrintFailureState valueOf(int value) {
        switch (value) {
            case 0:
                return PrinterNotFound;
            case 1:
                return BluetoothNotAvailable;
            case 2:
                return PrinterIsConnecting;
            case 3:
                return BluetoothNotEnabled;
            case 4:
                return UserCanceled;
            case 5:
                return NoContent;
            default:
                return PrinterNotFound;
        }
    }
}
